import { lazy } from "react";
import {
  HomeOutlined,
  PictureOutlined,
  MenuOutlined
} from '@ant-design/icons';

const routes = [
  {
    key: '0-0',
    path: '/',
    title: '系统首页',
    icon:<HomeOutlined />,
    component: lazy(() => import('./../views/home/Index.jsx'))
  },
  {
    key: '0-1',
    path: '/banner',
    title: '轮播图管理',
    redirect: '/banner/list',
    icon:<PictureOutlined />,
    children: [
      {
        key: '0-1-0',
        path: '/banner/list',
        title: '轮播图列表',
        icon:<MenuOutlined />,
        component: lazy(() => import('./../views/banner/Index.jsx'))
      },
      {
        key: '0-1-1',
        path: '/banner/add',
        title: '添加轮播图',
        icon:<MenuOutlined />,
        component: lazy(() => import('./../views/banner/Add.jsx')),
        hidden: true
      }
    ]
  },
  {
    key: '0-2',
    path: '/pro',
    title: '文章管理',
    redirect: '/pro/list',
    icon: <PictureOutlined />,
    children: [
      {
        key: '0-2-0',
        path: '/pro/list',
        title: '文章列表',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/pro/Index.jsx'))
      },
      {
        key: '0-2-1',
        path: '/pro/add',
        title: '添加文章',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/pro/Add.jsx')),
        hidden: true
      }
    ]
  },
  {
    key: '0-3',
    path: '/user',
    title: '账户管理',
    icon:<PictureOutlined />,
    redirect: '/user/list',
    children: [
      {
        key: '0-3-0',
        path: '/user/list',
        title: '用户列表',
        icon:<HomeOutlined />,
        component: lazy(() => import('./../views/user/Index.jsx')),
        hidden: true
      },
      {
        key: '0-3-1',
        path: '/user/admin',
        title: '管理员列表',
        icon:<HomeOutlined />,
        component: lazy(() => import('./../views/user/Admin.jsx'))
      }
    ]
  },
  {
    key: '0-4',
    path: '/setting' ,
    title: '设置',
    icon: <HomeOutlined />,
    component: lazy(() => import('./../views/setting/Index.jsx')),
    hidden: true
  }
]

export default routes